﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="collaboration-requests.aspx.cs" Inherits="DeansWsccProject.collaboration_requests" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:TextBox ID="tbRequest" runat="server" Width="600px"></asp:TextBox>
    <ajaxToolkit:RoundedCornersExtender ID="tbRequest_RoundedCornersExtender" runat="server" Enabled="True" TargetControlID="tbRequest">
    </ajaxToolkit:RoundedCornersExtender>
    <asp:Button ID="btnPostRequest" runat="server" Text="Post Request" OnClick="btnPostRequest_Click" />
    <ajaxToolkit:RoundedCornersExtender ID="btnPostRequest_RoundedCornersExtender" runat="server" Enabled="True" TargetControlID="btnPostRequest">
    </ajaxToolkit:RoundedCornersExtender>
    <asp:PlaceHolder ID="tbRequestRequiredPlaceHolder" runat="server" Visible="False">
        Please enter a request.
    </asp:PlaceHolder>
    <br />
    <hr />
    <br />
    <asp:ListView ID="collaborationRequestsListView" runat="server" OnItemDataBound="collaborationRequestsListView_ItemDataBound" DataKeyNames="ID">
        <AlternatingItemTemplate>
            <span style="background-color: #FAFAD2;color: #284775;">
            <%# Eval("description") %>
            <br />
            <br />
            Posted by <a href="/profile.aspx?profileUserName=<%# Eval("profileUserName") %>"><%# Eval("FirstName") %> <%# Eval("LastName") %></a> on <%# Convert.ToString(Eval("dateOfPost")).Remove(10, 9) %>
            <br />
            <asp:Repeater ID="collaboratorsRepeater" runat="server">
                <HeaderTemplate>
                    Collaborators: 
                </HeaderTemplate>
                <ItemTemplate>
                    <a href="/profile.aspx?profileUserName=<%# DataBinder.Eval(Container.DataItem, "profileUserName") %>"><%# DataBinder.Eval(Container.DataItem, "FirstName") %> <%# DataBinder.Eval(Container.DataItem, "LastName") %></a> 
                </ItemTemplate>
                <FooterTemplate>
                    <br />
                </FooterTemplate>
            </asp:Repeater>
            <asp:Button ID="btnSendCollaboratorRequest" runat="server" Text="Send Collaboration Request" OnClick="btnSendCollaboratorRequest_Click" CommandArgument='<%# Eval("ID") %>' />
            <ajaxToolkit:RoundedCornersExtender ID="btnSendCollaboratorRequest_RoundedCornersExtender" runat="server" Enabled="True" TargetControlID="btnSendCollaboratorRequest">
            </ajaxToolkit:RoundedCornersExtender>
            <asp:Button ID="btnCollaboratorRequestSent" runat="server" Text="Collaborator Request Sent" Visible="False" Enabled="False" />
            <ajaxToolkit:RoundedCornersExtender ID="btnCollaboratorRequestSent_RoundedCornersExtender" runat="server" Enabled="True" TargetControlID="btnCollaboratorRequestSent">
            </ajaxToolkit:RoundedCornersExtender>
            <br />
            <hr />
<br /></span>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <span style="background-color: #FFCC66;color: #000080;">ID:
            <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            description:
            <asp:TextBox ID="descriptionTextBox" runat="server" Text='<%# Bind("description") %>' />
            <br />
            FirstName:
            <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>' />
            <br />
            LastName:
            <asp:TextBox ID="LastNameTextBox" runat="server" Text='<%# Bind("LastName") %>' />
            <br />
            profileUserName:
            <asp:TextBox ID="profileUserNameTextBox" runat="server" Text='<%# Bind("profileUserName") %>' />
            <br />
            dateOfPost:
            <asp:TextBox ID="dateOfPostTextBox" runat="server" Text='<%# Bind("dateOfPost") %>' />
            <br />
            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
            <br /><br /></span>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <span>No data was returned.</span>
        </EmptyDataTemplate>
        <InsertItemTemplate>
            <span style="">description:
            <asp:TextBox ID="descriptionTextBox" runat="server" Text='<%# Bind("description") %>' />
            <br />FirstName:
            <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>' />
            <br />LastName:
            <asp:TextBox ID="LastNameTextBox" runat="server" Text='<%# Bind("LastName") %>' />
            <br />profileUserName:
            <asp:TextBox ID="profileUserNameTextBox" runat="server" Text='<%# Bind("profileUserName") %>' />
            <br />dateOfPost:
            <asp:TextBox ID="dateOfPostTextBox" runat="server" Text='<%# Bind("dateOfPost") %>' />
            <br />
            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
            <br /><br /></span>
        </InsertItemTemplate>
        <ItemTemplate>
            <span style="background-color: #FFFBD6;color: #333333;">
            <%# Eval("description") %>
            <br />
            <br />
            Posted by <a href="/profile.aspx?profileUserName=<%# Eval("profileUserName") %>"><%# Eval("FirstName") %> <%# Eval("LastName") %></a> on <%# Convert.ToString(Eval("dateOfPost")).Remove(10, 9) %>
            <br />
            <asp:Repeater ID="collaboratorsRepeater" runat="server">
                <HeaderTemplate>
                    Collaborators: 
                </HeaderTemplate>
                <ItemTemplate>
                    <a href="/profile.aspx?<%# DataBinder.Eval(Container.DataItem, "profileUserName") %>"><%# DataBinder.Eval(Container.DataItem, "FirstName") %> <%# DataBinder.Eval(Container.DataItem, "LastName") %></a> 
                </ItemTemplate>
                <FooterTemplate>
                    <br />
                </FooterTemplate>
            </asp:Repeater>
            <asp:Button ID="btnSendCollaboratorRequest" runat="server" Text="Send Collaboration Request" OnClick="btnSendCollaboratorRequest_Click" CommandArgument='<%# Eval("ID") %>' />
            <ajaxToolkit:RoundedCornersExtender ID="btnSendCollaboratorRequest_RoundedCornersExtender" runat="server" Enabled="True" TargetControlID="btnSendCollaboratorRequest">
            </ajaxToolkit:RoundedCornersExtender>
            <asp:Button ID="btnCollaboratorRequestSent" runat="server" Text="Collaborator Request Sent" Visible="False" Enabled="False" />
            <ajaxToolkit:RoundedCornersExtender ID="btnCollaboratorRequestSent_RoundedCornersExtender" runat="server" Enabled="True" TargetControlID="btnCollaboratorRequestSent">
            </ajaxToolkit:RoundedCornersExtender>
            <br />
            <hr />
<br /></span>
        </ItemTemplate>
        <LayoutTemplate>
            <div id="itemPlaceholderContainer" runat="server" style="font-family: Verdana, Arial, Helvetica, sans-serif;">
                <span runat="server" id="itemPlaceholder" />
            </div>
            <div style="text-align: center;background-color: #FFCC66;font-family: Verdana, Arial, Helvetica, sans-serif;color: #333333;">
            </div>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <span style="background-color: #FFCC66;font-weight: bold;color: #000080;">ID:
            <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            description:
            <asp:Label ID="descriptionLabel" runat="server" Text='<%# Eval("description") %>' />
            <br />
            FirstName:
            <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>' />
            <br />
            LastName:
            <asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>' />
            <br />
            profileUserName:
            <asp:Label ID="profileUserNameLabel" runat="server" Text='<%# Eval("profileUserName") %>' />
            <br />
            dateOfPost:
            <asp:Label ID="dateOfPostLabel" runat="server" Text='<%# Eval("dateOfPost") %>' />
            <br />
<br /></span>
        </SelectedItemTemplate>
    </asp:ListView>
</asp:Content>
